function setStars(stars, maxStart)
{
	for (i = 1; i <= maxStart; i++)
		document.getElementById('star_' + i).src = 'http://gfx1.bryk.pl/graphics/star_' + ((i <= stars)?'on':'off') + '.gif';
}

function writeNotepad(textId, icon)
{
	document.write('<a href="/notatnik/?add_text='+textId+'">');
	if (icon)
		document.write('<img src="http://gfx1.bryk.pl/graphics/icon_notepad.gif" alt="" />');
	else
		document.write('Dodaj do notatnika');
	document.write('</a>');
}

function writeDoc(textId, mini, filename, extension, icon)
{
	document.write('<a href="'+(mini?'mini':'source')+'/'+textId+'-'+filename+'.'+extension+'">');
	if (icon)
		document.write('<img src="http://gfx1.bryk.pl/graphics/icon_'+(mini?'mini':'download')+'.gif" alt="" />');
	else
	{
		if (mini)
			document.write('Mini-ściąga do druku');
		else
			document.write('Pobierz pracę');
	}
	document.write('</a>');
}

function writeComment(commentUrl, icon)
{
	document.write('<a href="'+commentUrl+'?add">');
	if (icon)
		document.write('<img src="http://gfx1.bryk.pl/graphics/icon_comment.gif" alt="" />');
	else
		document.write('Dodaj komentarz');
	document.write('</a>');
}